package state.person.events;

import messages.ByteList;
import messages.CString;
import state.group.events.BaseEvent;

public abstract class BasePersonEvent extends BaseEvent {
    
    protected CString personId;
    
    public BasePersonEvent(byte[] data, int startIndex)
    {
        personId = new CString(data, startIndex + 1);
    }
    
    public BasePersonEvent(CString personId)
    {
        this.personId = personId;
    }
    
    public void appendToByteList(ByteList list)
    {
        super.appendToByteList(list);
        personId.appendToByteList(list);
    }
    
    public CString getPersonId()
    {
        return personId;
    }
    
}
